#pragma once
class CCfgFile
{
public:
	BOOL WriteProfileInt(LPCTSTR lpSectionName,LPCTSTR lpKeyName,int nValue);
	BOOL WriteProfileStr(LPCTSTR lpSectionName,LPCTSTR lpKeyName,LPCTSTR lpString);
	BOOL DeleteKey(LPCTSTR lpSectionName,LPCTSTR lpKeyName);
	BOOL DeleteSection(LPCTSTR lpSectionName);
	CString GetProfileStr(LPCTSTR lpSectionName,LPCTSTR lpKeyName,LPCTSTR strDefault = _T(""));
	float GetProfileFloat(LPCTSTR lpSectionName,LPCTSTR lpKeyName,float fDefault=0.0f);
	int GetProfileInt(LPCTSTR lpSectionName,LPCTSTR lpKeyName,int nDefault=0);
	BOOL  OpenFile(LPCTSTR szFileName);

	CCfgFile(LPCTSTR lpszFileName);
	virtual ~CCfgFile();

protected:
	CString m_strFileName;
};
